package org.example.maven.service;

import org.example.maven.utils.excel.ExcelImportResult;
import org.example.maven.utils.excel.ExcelRowParser;
import org.springframework.web.multipart.MultipartFile;

import java.io.IOException;
import java.util.List;
import java.util.function.Consumer;

public interface ExcelImportService {
    <T> ExcelImportResult<T> importExcel(MultipartFile file,
                                         ExcelRowParser<T> parser,
                                         int batchSize,
                                         Consumer<List<T>> batchConsumer) throws IOException;
}
